#ifndef MONITORPRO_SHM_H
#define MONITORPRO_SHM_H

#include <string>

#define ACCESS_BIT 0666
#define SEM_EXIST (-2)

#if !defined(__APPLE__) && !defined(__MACH__)
union semun
{
    int val;
    struct semid_ds *buf;
    unsigned short *array;
};
#endif

int sky_sem_new();

int sky_sem_get();

int sky_sem_p(int sem_id);

int sky_sem_v(int sem_id);

int sky_sem_del(int sem_id);

#endif
